using System.Net;
using System.Xml;
using org.apache.solr.SolrSharp.Configuration;
using org.apache.solr.SolrSharp.Configuration.Schema;

namespace SolrSharp.Adapters {
	public class SolrSearcherAdapter : ISolrSearcher {
		private readonly SolrSearcher searcher;

		public bool Supports(Mode searcherMode) {
			return searcher.Supports(searcherMode);
		}

		public HttpStatusCode Ping() {
			return searcher.Ping();
		}

		public string GetConfigurationValue(ConfigurationFile eConfigFile, string xpathquery) {
			return searcher.GetConfigurationValue(eConfigFile, xpathquery);
		}

		public XmlNodeList GetConfigurationData(ConfigurationFile eConfigFile, string xpathquery) {
			return searcher.GetConfigurationData(eConfigFile, xpathquery);
		}

		public XmlDocument GetConfigurationXml(ConfigurationFile eConfigFile) {
			return searcher.GetConfigurationXml(eConfigFile);
		}

		public SolrSchema SolrSchema {
			get { return searcher.SolrSchema; }
		}

		public SolrSearcherAdapter(SolrSearcher searcher) {
			this.searcher = searcher;
		}

		public SolrSearcher InnerSearcher {
			get { return searcher; }
		}
	}
}